 \begin{lemma} \label{lem:delta}
 The following equality holds for $v(t,n,y)$.
 \begin{align*} 
 v(t,n,y)&=\surv{C_t}{y}\bigg[ v(t+y,n,0)-v^{\pi_0}(t+y,n)\bigg]+v^{\pi_0}(t,n)
 \end{align*}
 \end{lemma}
 \proof {Proof.}
  ~\\We can calculate $v(t,n,y)$ as follows:
 \begin{align*}
 v(t,n,y)&=q_c\int_{0}^{y} x\pdf{C_t}{x} dx +\surv{C_t}{y} \big [q_c y+v(t+y,n,0) \big ]
 \end{align*}
 After rearranging terms, we get:
 \begin{align*}
 v(t,n,y)&=\surv{C_t}{y}\big[ v(t+y,n,0)-v^{\pi_0}(t+y,n)\big]+q_c\int_{0}^{y} x\pdf{C_t}{x} dx+\surv{C_t}{y} \big [q_c y+v^{\pi_0}(t+y,n) \big]\\
 	&=\surv{C_t}{y}\big[ v(t+y,n,0)-v^{\pi_0}(t+y,n)\big]+q_c\left[ \int_{0}^{y} x\pdf{C_t}{x} dx+\surv{C_t}{y} [ y+\Ex C_{t+y} ]\right]\\
 	&=\surv{C_t}{y}\big[ v(t+y,n,0)-v^{\pi_0}(t+y,n)\big]+q_c\Ex C_{t}\\
 	&=\surv{C_t}{y}\big[ v(t+y,n,0)-v^{\pi_0}(t+y,n)\big]+v^{\pi_0}(t,n).
 \end{align*}
 \begin{figure}[htbp]
 \centering
 \includegraphics[scale=0.6]{./files/QALE-F1.pdf}
 \caption{$v(t,n,y)$ versus $v^{\pi_0}(t,n)$ }
 \label{fig:lem}
 \end{figure}
 Consider Figure \ref{fig:lem}. Another way of proving this equality is by calculating $v(t,n,y)- v^{\pi_0}(t,n)$ as follows:
 \begin{align*} 
 v(t,n,y)- v^{\pi_0}(t,n)=&\bigg[\big(v(t,n,y)- v^{\pi_0}(t,n)\big) \big | C_t \le y \bigg]\pr [C_t \le y]+\bigg[\big(v(t,n,y)- v^{\pi_0}(t,n)\big) \big | C_t > y \bigg]\pr [C_t > y]\\
 &=\pr [C_t \le y](0)+\pr [C_t > y]\big[v(t+y,n,0)- v^{\pi_0}(t+y,n)\big]\\
 &=\surv{C_t}{y}\big[ v(t+y,n,0)-v^{\pi_0}(t+y,n)\big].  \Halmos
 \end{align*}
 \endproof
 \noat{I guess we can remove the first proof.\\}
 
 
 \begin{repeattheorem}[Theorem \ref{thm:cdis}] \text{\normalfont \textbf{(Critical Disutility)}} At any age, there exist a critical AVF creation disutility denoted by $d^{\text{cr}}(t)$, such that the optimal decision at time $t$ is to do AVF surgery immediately if patient's AVF creation disutility is not higher than the critical disutility (i.e. if $d \le d^{\text{cr}}(t)$), and is to use CVC for the rest of patient's life, otherwise.
 \end{repeattheorem}
 \proof {Proof.} Fix $t$. Define $\Delta Q(t)$ as the benefit of an immediate AVF surgery vs using CVC for the rest of the patient's lifetime before subtracting the AVF creation disutility. In other words, $\Delta Q(t)=d+v(t,1,0) -v^{\pi_0}(t,1)$. By Theorem \ref{thm:d=0}, $\Delta Q(t) \ge 0$. By Proposition \ref{prop:thresh_dec}, we have that $\Delta Q(t)$ is decreasing in $t$. In Theorem \ref{thm:compdcrt}, we prove that $\Delta Q(t)$ is decreasing in $M$ and increasing in $K$. Thus, $\Delta Q(t) \le \Ex [A_t - C_t]$, in which the upper bound is achieved when $K=\infty$, and $M=0$ with probability one. Therefore, $\Delta Q(t)$ is finite. By Equation \ref{eq:IFFTHLD}, $t < \tau^*(d)$, and immediate surgery is optimal, if and only if $\Delta Q(t) \ge d$. Since $\Delta Q(t)$ is decreasing in $t$, we have $d^{\text{cr}}(t)=\Delta Q(t)$. 
 \endproof
 
 \vspace{.5cm}
 As the theorem states, these bounds are valid for values of $t$ that are far enough from the censoring time ($t+M \le t'$ with probability 1). This condition ensures that at the time of censoring, $t'$, the AVF maturation period is over.
 
 
 
 
 
 Therefore, we have the followings:
 \begin{align} \label{eq:wlu1}
 w_{u}(t,m,k)-w(t,m,k) \ge w_{u}(t,m,0)-w(t,m,0) \ge 0,\\\label{eq:wlu2}
 w_{l}(t,m,k)-w(t,m,k) \le w_{l}(t,m,0)-w(t,m,0) \le 0.
 \end{align}
 in which the right hand side inequalities are based on the facts that $w(t,m,0)=q_C\Ex C_t$, and that $\mathbf{r}^{l}_C(s)$ and $\mathbf{r}^{u}_C(s)$ lower and upper bound all possible hazard rate functions for $C$.
 
 Let $\pi_1$ denote a policy in which a patient undergoes a surgery at $t$ for her only one AVF chance. Then, the critical disutility is the difference of a patient's weighted lifetime between policies $\pi_1$ and $\pi_0$, by definition. Let $M'$ and $K'$ be random variables denoting the remaining AVF maturation time and lifetime at time $t'$ and recall that $d^{cr}(t)=\Ex_{M,K}[w(t,m,k)]-v^{\pi_0}(t,1)$. Since the survival difference due to a different way of extrapolation does not start until $t=t'$, only the patient's weighted lifetime after $t'$ is affected by extrapolation.
 Therefore, we have the following for $d^{cr}(t)$:
 \begin{align*}
 d^{cr}(t) = d_0+p_1 \Ex_{M',K'} [w(t',m,k)]-p_0 v^{\pi_0}(t',1),
 \end{align*}
 where $d_0$ is a constant term, and $p_1$ and $p_0$ are patient's survival probabilities until $t'$ under policies $\pi_1$ and $\pi_0$, respectively, all independent of extrapolation. Since patients experience better survival on an AVF than on a CVC by Assumption \ref{ass:relative}, we have $p_1 \ge p_0$. Therefore, by Equations \ref{eq:wlu1} we have:
 \begin{align*} 
 p_1[w_{u}(t,m,k)-w(t,m,k)] \ge p_0[w_{u}(t,m,0)-w(t,m,0)],\\
 p_1[w_{l}(t,m,k)-w(t,m,k)] \le p_0[w_{l}(t,m,0)-w(t,m,0)].
 \end{align*}
 Taking expectation with respect to $M'$ and $K'$ we get $d^{cr}_u(t) \ge d^{cr}(t)$ and $d^{cr}_l(t) \le d^{cr}(t)$.
 
 
 
 \item \textbf{Optimality equation}: The Bellman optimality equation is as follows:
 \begin{align*}
 v(t,n)=
 \begin{cases}
 \max \{ \sup_y v(t,n,y), v^{\pi_0}(t,n) \} & n\ge 1\\
 v^{\pi_0}(t,0) & n=0
 \end{cases}
 \end{align*}
 in which 
 \begin{align} \label{eq:vnull}
 & v^{\pi_0}(t,n)=q_c\Ex C_t,\\ \label{eq:vtny}
 & v(t,n,y)= R\big((t,n),@_y\big)+\pr[L(t,n,y) \ge t'(y)-t].\Ex_{t'(y) \big | L(t,n,y) \ge t'(y)-t} \big[ v(t',n-1) \big].
 \end{align}
 \end{itemize}
 Equation \ref{eq:vnull} follows from the fact that following the no-referral policy, the patient remains on a CVC until she dies and her residual lifetime under this policy is $C_t$, and thus receives $q_c\Ex C_t$. Equation \ref{eq:vtny} can be explained as follows. The patient receives the immediate reward of $R\big((t,n),@_y\big)$ for taking action $@_y$. Then, with probability $1-\pr[L(t,n,y) \ge t'(y)-t]$ she dies and transitions to the state $\Delta$ in which she collects no more QALE, and with probability $\pr[L(t,n,y) \ge t'(y)-t]$ she transitions to the state $(t'(y), n-1)$ in which she collects $v(t',n-1)$. Since $t'(y)$ is a random variable (recall that $t'(y)=t+y+M_n+K_n$), the patient collects  $\Ex_{t'(y) \big | L(t,n,y) \ge t'(y)-t} \big[ v(t',n-1) \big]$. The reason for conditional expectation is that knowing the fact that the patient has transitioned to the state $(t',n-1)$ affects the distribution of $t'(y)$.
 
 
 
 \begin{proposition}[Existence of a Referral Threshold for $n=1$] \label{prop:qalen=1} ~\\
 Assume $n=1$. Under Assumptions \ref{ass:dec}-\ref{ass:qol}, there is a threshold $\tau^*$ such that the policy $\pi(\tau^*)$ maximizes the expected QALE of the patient. In other words, for $t < \tau^*$, referral at $t$ is the optimal action, otherwise, the no-referral policy is optimal.
 \end{proposition}
 Note that for simplicity of notation, we do not show the dependency of the threshold on the age at HD initiation and other model parameters.
 
 
 \subsection{A Special Case} \label{sec:spec}
 In this section, we discuss a special case in which we assume that a patient's lifetime on HD follows exponential distribution. The importance of this special case is three fold:
 \begin{enumerate}
 \item We can find a closed form for the critical disutility. Using the closed form, we can demonstrate how different components of the model interact.
 \item It provides an upper-bound on the critical disutility.
 \item Exponential distribution for survival has been considered in other related research works (see \cite{Xue, Leermakers}). Furthermore, exponential distribution is a plausible assumption when the patient has a short life expectancy.
 \end{enumerate}
 
 Assume $A \sim \exp(a)$, and $C \sim \exp(c)$. Note that $\hrate{A}{t}=a$ and $\hrate{C}{t}=c$, and therefore Assumptions \ref{ass:relative}-\ref{ass:IFR} are satisfied if and only if $a \le c$. Therefore, we assume $0<a \le c$ for the rest of this section.
 
 The optimal policy for the total lifetime metric is independent of the distributions of $A$ and $C$. Therefore, we only discuss the optimal policy for the QALE metric. As Theorem \ref{thm:QALE} suggest, there is an age-threshold when the optimal policy switches from immediate AVF surgery  to use CVC forever. But since the exponential distribution has the memoryless property and lacks any notion of aging, the optimal decision must be the same at all ages. We prove that implicitly as follows:
 
 \begin{theorem}\label{thm:exp}
 Assume that $A \sim \exp(a)$, and $C \sim \exp(c)$, where $0<a \le c$. Then,
 \begin{align}\label{eq:components}
 d^{\text{cr}}(t) =d^{cr}:= p\bigg[\frac{q_a}{a}-\frac{q_c}{c} \bigg] \bigg[\Ex_M\big[ e^{-cM}\big]\bigg ] \bigg[1-\Ex_Z\big[ e^{-aZ}\big] \bigg].
 \end{align}
 where $p$ is the success probability of the AVF creation process, and $Z$ is the lifetime of a functional AVF. Furthermore, if $M\sim \exp(m)$, and $K\sim \exp(k)$, we have:
 \begin{align*}
 d^{\text{cr}} = p .\bigg[\frac{q_a}{a}-\frac{q_c}{c}\bigg] .  \frac{1}{1+ \frac{m}{c}} . \frac{1}{1+ \frac{a}{k}}.
 \end{align*}
 \end{theorem}
 Since $d^{\text{cr}}$ is a constant term (with respect to $t$), the optimal decision is to always (i.e. at all ages) refer immediately, if $d \le d^{\text{cr}}$, and never refer at all, otherwise.
 
 Equation \ref{eq:components} also demonstrates how different components of the model play their role in defining the critical disutility. The critical disutility is product of four terms:
 \begin{enumerate}
 \item $\dfrac{q_a}{a}-\dfrac{q_c}{c}$: this represents the ideal quality adjusted lifetime benefit of an AVF over a CVC, which we could achieve if 1. AVF could mature right away, 2. the surgery would always be successful, and 3. AVF lived forever.
 \item $0 \le \Ex_M[ e^{-cM}] \le 1$: this factor represents the impact of the maturation time. The ideal QALE benefit of the AVF is downscaled by this factor because the benefit applies only when the maturation time is over and the patient switches to the prepared AVF. Until this time, the patient have to use a CVC to receive HD.
 \item $p$: this represents the impact of success probability of AVF creation. The patient benefits from using an AVF only when the AVF creation is successful.
 \item $0 \le 1-\Ex_Z [ e^{-aZ}] \le 1$: this factor represents the impact of (limited) lifetime of an AVF. Even if the patient survives until she switches to a successfully matured AVF, the lifetime of an AVF is limited and she has to switch back to a CVC when the AVF fails.
 \end{enumerate}
 Note that this result is in agreement with results of Theorem \ref{thm:compdcrt}. For instance, the critical disutility defined in Equation \ref{eq:components} is higher when AVF maturation time, $M$, is (stochastically) smaller.
 
 It is worth mentioning that for this case the critical disutility can be easily calculated (recall that $\Ex_X[e^{-tX}]$ is the moment generating function of a random variable $X$ evaluated at $-t$).
 
 In the following corollary, by combining the result of Theorems \ref{thm:compdcrt} and \ref{thm:exp}, we provide an upper-bound for the critical disutility.
 \begin{corollary} \label{cor:expbound}
 The following holds for the critical disutility:
 \begin{align*}
 d^{\text{cr}}(t) \le p\bigg[\frac{q_a}{\hrate{A}{t}}-\frac{q_c}{\hrate{C}{t}}\bigg]\bigg[\Ex_M\big[ e^{-M \hrate{C}{t}}\big]\bigg ]\bigg[1-\Ex_B\big[ e^{-B\hrate{A}{t}}\big] \bigg].
 \end{align*}
 \end{corollary}
 The upper-bound can be used when the survival data is censored. We discuss this further in Section \ref{sec:censored}.
 
 It is necessary to assume $\alpha_A \le \beta_C$ and $\alpha_C \le \beta_A$ to allow Assumptions \ref{ass:surv}-\ref{ass:AVFs} to be satisfied by at least one pair of hazard rate functions for $A$ and $C$. 
 
 \begin{repeattheorem} [Corollary \ref{cor:d=0}.]
 If $d=0$, then the immediate referral (when a decision point occurs) is optimal at all times.
 \end{repeattheorem}
 
 \proof{Proof.} By Lemma \ref{lem:dec_v}, $w(t,m,k)$ is increasing in $k$, and thus:
 \begin{align*}
 \forall k,m, t: w(t,m,k) \ge w(t,m,0).
 \end{align*}
 Taking the expectation with respect to $K$ and $M$ and using the fact that $d=0$ and Equations \ref{eq:w_v1}-\ref{eq:w_v0}, we get $\forall t: v(t,1,0) \ge v^{\pi_0}(t,1)$. Thus, by Equation \ref{eq:IFFTHLD}, we have that $\tau^* = \infty$. \Halmos
 \endproof